﻿namespace Microsoft.VisualStudio.TextTemplating.CommandLine
{
    using System;
    using System.Collections;
    using System.Globalization;
    using System.Reflection;

    internal class CommandSpecificationCollection : CollectionBase
    {
        public int Add(CommandSpecification specification)
        {
            return ((IList) this).Add(specification);
        }

        public CommandSpecification this[string name]
        {
            get
            {
                foreach (CommandSpecification specification in base.InnerList)
                {
                    if (string.Compare(name, specification.Name, true, CultureInfo.CurrentCulture) == 0)
                    {
                        return specification;
                    }
                }
                return null;
            }
        }
    }
}

